import { createRouter, createWebHistory } from 'vue-router'

import MainPage from "@/MainPage.vue";
import PostPage from "@/PostPage.vue";
import UserPage from "@/UserPage.vue";
import AdoptPage from "@/AdoptPage.vue";
import LoginPage from "@/LoginPage.vue"
import RegisterPage from '@/RegisterPage.vue';
import adoptMessagePage from '@/adoptMessagePage.vue';
import SearchPageGeneral from '@/SearchPageGeneral.vue';
import SearchPageAdopt from '@/SearchPageAdopt.vue';
import SearchPageUser from '@/SearchPageUser.vue';
import MessagePageLike from '@/MessagePageLike.vue';
import MessagePageComment from '@/MessagePageComment.vue';
import MessagePageApply from '@/MessagePageApply.vue';
import applyAdopt from '@/components/applyAdopt.vue';
//第二步 : 创建路由器
const router = createRouter({
    history : createWebHistory(), //路由器的工作模式
    routes : [ //一个个的路由规则
        {
            path:'/',
            component:LoginPage,
            name:'Login'
        },
        {
            path:'/Register',
            component:RegisterPage,
            name:'Register'
        },
        {
            path:'/MainPage',
            component:MainPage,
            name:'MainPage'
        },
        {
            path:'/SearchPage/general',
            component:SearchPageGeneral,
            name:'SearchPageGeneral'
        },
        {
            path:'/SearchPage/adopt',
            component:SearchPageAdopt,
            name:'SearchPageAdopt'
        },
        {
            path:'/SearchPage/user',
            component:SearchPageUser,
            name:'SearchPageUser'
        },
        {
          path:'/AdoptPage',
          component:AdoptPage,
          name:'AdoptPage'
        },
        {
            path:'/AdoptPageMessage',
            component:adoptMessagePage,
            name:'adoptMessagePage'
        },
        {
            path:'/applyAdopt',
            component:applyAdopt,
            name:'applyAdopt'
        },
        {
            path:'/Message/like',
            component:MessagePageLike,
            name:'MessagePageLike'
        },
        {
            path:'/Message/comment',
            component:MessagePageComment,
            name:'MessagePageComment'
        },
        {
            path:'/Message/apply',
            component:MessagePageApply,
            name:'MessagePageApply'
        },
        {
            path:'/PostPage',
            component:PostPage,
            name:'PostPage'
        },
        {
            path:'/UserPage',
            component:UserPage,
            name:'UserPage'
        },

    ]
})

//暴露出去
export default router;
